﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JXT.PrimaryKey.Batman.Domain.Quotation.Models;
using JXT.PrimaryKey.Batman.Domain.Services;

namespace JXT.PrimaryKey.Batman.Domain.Quotation.Services
{
    public interface ISecuritiesService : ICachedService
    {
        void Save(Securities entity);

        /// <summary>
        /// 根据证券代码获取证券信息
        /// </summary>
        /// <param name="code">代码</param>
        /// <returns>证券信息</returns>
        Securities GetSingle(string code, MarketType marketType = MarketType.Unknown);

        /// <summary>
        /// 模糊查询
        /// </summary>
        /// <param name="code">上市公司股票代码</param>
        /// <param name="num">需要的条数</param>
        /// <param name="marketType">交易所类型</param>
        /// <param name="securitiesType">证券类型</param>
        /// <returns>符合条件的记录</returns>
        IEnumerable<Securities> SearchList(string code, int num, MarketType marketType = MarketType.Unknown, SecuritiesType securitiesType = SecuritiesType.Unknown);

        /// <summary>
        /// 根据市场类型获取证劵信息
        /// </summary>
        /// <param name="market">市场类型</param>
        /// <returns>符合条件的记录</returns>
        IEnumerable<Securities> GetList(MarketType market = MarketType.Unknown);
    }
}
